<template>
  <div
    style="overflow-x: hidden; overflow-y: auto"
    v-if="commandInvocationList"
  >
    <el-table
      height="100px"
      v-adaptive
      :data="commandInvocationList"
      style="width: 100%"
    >
      <el-table-column prop="command.name" label="命令"> </el-table-column>
      <el-table-column label="信息源">
        <template slot-scope="scope">
          <span>{{ scope.row.initiator }}({{ scope.row.initiatorId }})</span>
        </template>
      </el-table-column>
      <el-table-column prop="target" label="目标"> </el-table-column>
      <el-table-column prop="eventDate" label="开始日期">
        <template slot-scope="scope">
          {{ formatDateT(scope.row.eventDate) }}
        </template>
      </el-table-column>
      <el-table-column prop="receivedDate" label="接收日期">
        <template slot-scope="scope">
          {{ formatDateT(scope.row.receivedDate) }}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    commandInvocationList: {
      type: Array,
      default: [],
    },
  },
  data() {
    return {};
  },
  mounted() {},
  methods: {
    formatDateT(date) {
      return formatTime(date);
    },
  },
};
import { formatTime } from "@/views/common/js/utils.js";
</script>

<style>
</style>
